import * as req from '@/request';


export async function list(
  params?: { [key: string]: any },
  sorter?: { [key: string]: any },
  filter?: { [key: string]: any },
) {
  return req.postForm<API.IdcOrderList>('/idcorder/list', params, sorter, filter);
}


export async function regions(
  params?: { [key: string]: any },
  sorter?: { [key: string]: any },
  filter?: { [key: string]: any },
) {
  return req.postForm<API.IdcRegionList>('/idcorder/regions', params, sorter, filter);
}

export async function catalogs(
  params?: { [key: string]: any },
  sorter?: { [key: string]: any },
  filter?: { [key: string]: any },
) {
  return req.postForm<API.IdcCatalogList>('/idcorder/catalogs', params, sorter, filter);
}

export async function sshkeys(
  params?: { [key: string]: any },
  sorter?: { [key: string]: any },
  filter?: { [key: string]: any },
) {
  return req.postForm<API.IdcSshKeyList>('/idcorder/sshkeys', params, sorter, filter);
}

export async function osimages(
  params?: { [key: string]: any },
  sorter?: { [key: string]: any },
  filter?: { [key: string]: any },
) {
  return req.postForm<API.IdcOsImageList>('/idcorder/osimages', params, sorter, filter);
}

export async function add(data: { [key: string]: any }) {
  return req.postForm<API.Result>('/idcorder/create', data);
}

export async function removeOrder(data: { [key: string]: any }) {
  return req.postForm<API.Result>('/idcorder/DeleteOrder', data);
}

export async function removeInstance(data: { [key: string]: any }) {
  return req.postForm<API.Result>('/idcorder/DeleteInstance', data);
}
